﻿@{
    Layout = null;
}
@model TEWorkFlow.Domain.Sys.SysEnterpriseArchives
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>大连乐哈哈超市连锁店有限公司</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="~/Styles/demo.css" />
    <script src="~/scripts/boot.js" type="text/javascript"></script>
    
</head>
<body>
    <!--Layout-->
    <div id="layout1" class="mini-layout fill">
        <div class="header" region="north" height="70" showsplit="false" showheader="false" style=" overflow:hidden;">
            <div style="float:right; min-width:360px;width:360px;height:100%; background-image:url(/Images/bannerRight.jpg);background-repeat:no-repeat;">
               
            </div>
            <div style="float: left;min-width:209px;width:500px;height:100%; /*background-image:url(/Images/bannerLeft.jpg);*/ background-repeat:no-repeat;">
                <h1 style="margin: 0; padding: 15px;margin-top:10px; cursor: default; font-family: 微软雅黑,黑体,宋体;color:#FFF;">
                    @Model.TempString
                </h1>
            </div>
            <div style="position: absolute; top: 18px; right: 10px;">
                
                <a class="mini-button mini-button-iconTop" iconcls="icon-bell"
                        onclick="showBlank" plain="true">公告</a>
                <a class="mini-button mini-button-iconTop" iconcls="icon-group-key" onclick="showChangePassWindow"
                    plain="true">修改密码</a> 
                @if (TEWorkFlow.Web.Client.Common.MyEnv.IsEmployeeLogin && false)
                {
                    <a class="mini-button mini-button-iconTop" iconcls="icon-cog-edit" onclick="showBusinessSettingWindow"
                        plain="true">业务设置</a> 
                    <a class="mini-button mini-button-iconTop" iconcls="icon-edit" onclick="showSettingWindow"
                        plain="true">系统设置</a> 
                }
                <a class="mini-button mini-button-iconTop" iconcls="icon-close" onclick="onLogOut"
                    plain="true">退出</a>
            </div>
        </div>
        <div title="south" region="south" showsplit="false" showheader="false" height="30">
            <div style="line-height: 28px; text-align: center; cursor: default">
                大连乐哈哈超市连锁有限公司 &copy; 2013 版权所有</div>
        </div>
        <div title="center" region="center" style="border: 0;" bodystyle="overflow:hidden;">
            <!--Splitter-->
            <div class="mini-splitter fill" borderstyle="border:0;">
                <div size="180" maxsize="250" minsize="100" showcollapsebutton="true" style="border: 0;">
                    <!--OutlookTree-->
                    <div id="leftTree" class="mini-outlookmenu" url="/Account/GetModules/" onitemclick="onItemSelect"
                        textfield="text" idfield="id" parentfield="pid" expandonload="true">
                    </div>
                </div>
                <div showcollapsebutton="false" style="noborder">
                    <!--Tabs-->
                    <div id="mainTabs" class="mini-tabs " activeindex="0" style="width: 100%; height: 100%;"
                        plain="false">
                        <div title="公告" url="/Test/Blank" id="tab_blank" iconcls="icon-bell">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        mini.parse();
        var tree = mini.get("leftTree");

        function onItemSelect(e) {
            var tabs = mini.get("mainTabs");
            var node = e.item;
            var id = "tab$" + node.id;
            if (node.newwindow == true) {
                openWindow(node.url, node.text, node.iconCls);
                return false;
            }
            var tab = tabs.getTab(id);
            //tabs.removeTab(tab);
            if (!tab) {
                tab = {};
                tab.name = id;
                tab.title = node.text;
                tab.iconCls = node.iconCls;
                tab.showCloseButton = true;

                //这里拼接了url，实际项目，应该从后台直接获得完整的url地址
                if (node.url) {
                    tab.url = node.url;
                }
                else {
                    tab.url = mini_JSPath + "../../docs/api/" + node.id + ".html";
                }
                tabs.addTab(tab);
            }
            else {
                tabs.reloadTab(tab);
            }
            tabs.activeTab(tab);
        }
        function showTab(node) {
            var tabs = mini.get("mainTabs");
            var id = "tab$" + node.id;
            if (node.newwindow == true) {
                openWindow(node.url, node.text, node.iconCls);
                return false;
            }
            var tab = tabs.getTab(id);
            //tabs.removeTab(tab);
            if (!tab) {
                tab = {};
                tab.name = id;
                tab.title = node.text;
                tab.iconCls = node.iconCls;
                tab.showCloseButton = true;

                //这里拼接了url，实际项目，应该从后台直接获得完整的url地址
                if (node.url) {
                    tab.url = node.url;
                }
                else {
                    tab.url = mini_JSPath + "../../docs/api/" + node.id + ".html";
                }
                tabs.addTab(tab);
            }
            tabs.activeTab(tab);
        }

        function onNodeSelect(e) {
            var node = e.node;
            var isLeaf = e.isLeaf;

            if (isLeaf) {
                showTab(node);
            }
        }


        function onClick(e) {
            var text = this.getText();
            alert(text);
        }
        function showBlank(e) {
            var tabs = mini.get("mainTabs");
            var tab = tabs.getTab(0);
            tabs.activeTab(tab);
            tabs.reloadTab(tab);
        }

        function showSettingWindow(e) {
            mini.open({
                url: "/Account/SysSetting/",
                title: "系统设置",
                iconCls: "icon-edit",
                allowResize: false,
                width: 650,
                height: 200,
                onload: function () {
                    //var iframe = this.getIFrameEl();
                    //var data = { action: "new" };
                    //iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                    location.href = location.href;
                }
            });
        }
        function showBusinessSettingWindow() {
            mini.open({
                url: "/Account/BaseSetting/",
                title: "基础参数设置",
                iconCls: "icon-edit",
                allowResize: false,
                width: 680,
                height: 270,
                onload: function () {
                    //var iframe = this.getIFrameEl();
                    //var data = { action: "new" };
                    //iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                }
            });
        }

        function showChangePassWindow() {
            mini.open({
                url: "/Account/ChangePassword/",
                title: "修改密码",
                iconCls: "icon-group-key",
                allowResize: false,
                width: 250,
                height: 170,
                onload: function () {
                    //var iframe = this.getIFrameEl();
                    //var data = { action: "new" };
                    //iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                }
            });
        }

        function openWindow(u, t, i) {
            mini.open({
                url: u,
                title: t,
                iconCls: i,
                allowResize: false,
                width: 680,
                height: 270,
                onload: function () {
                    //var iframe = this.getIFrameEl();
                    //var data = { action: "new" };
                    //iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                }
            });
        }

        function onLogOut(e) {
            location.href = "/Account/Logout/"
        }
        function onQuickClick(e) {
            tree.expandPath("datagrid");
            tree.selectNode("datagrid");
        }
    </script>
</body>
</html>
